chrome.tabs.query({ active: true, currentWindow: true }, function(tabs){
	console.log(tabs);
	var url = tabs[0].url;
	var title = tabs[0].title;
	document.getElementById('linkQZone').onclick = function () {
		var url1 = 'https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + url + '&title=' + title + '&desc=&summary=&site=';
		chrome.tabs.create({active: true, url: url1});
	};

	document.getElementById('linkQQ').onclick = function () {
		var url1 = 'https://connect.qq.com/widget/shareqq/index.html?url=' + url + '&title=' + title + '&desc=&summary=&site=';
		chrome.tabs.create({active: true, url: url1});
	};

	var qrcode = new QRCode(document.getElementById("qrcode"), {
		text: "http://jindo.dev.naver.com/collie",
		width: 128,
		height: 128,
		colorDark : "#000000",
		colorLight : "#ffffff",
		correctLevel : QRCode.CorrectLevel.H
	});
	qrcode.clear();
	qrcode.makeCode(url);
});